<template>
    <view class="page" :style="themeColor">
    <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex myCoupon_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
            <view   class='flex flex-wrap align-center justify-between myCoupon_fd0_0'     >
            <view   class='flex flex-wrap align-center myCoupon_fd0_0_c0'  @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  myCoupon_fd0_0_c0_c0' >&#xE794;</text>
</view>
    <view   class='flex flex-wrap align-center'     >
        <text class='myCoupon_fd0_0_c1_c0' >我的优惠券</text>
</view>
    <view   class='flex align-center justify-end myCoupon_fd0_0_c2'     >
        </view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex benben-flex-layout flex-wrap align-center"   >
        <view>
        <benben-flex-tabs class-name='myCoupon_benbenTabsfd1_0' v-model="tabs" ref="benben_tabsfd1_0" select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0" :open-title-type='false' :open-sticky='true' :top='88' :is-show-content='false' :scrollspy='false'  :tabs-info.sync="tabsInfofd1_0" @change="DataListFunc()" >
            
                    <scroll-view
          @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft"
          id="benben_tabsfd1_0"
          class="benben-tabs"
          style="width:750rpx"
          :scroll-x="true"
          :scroll-left.sync="tabsInfofd1_0.moveX"
          scroll-with-animation="all .3s ease"
        >
          <view class="benben-tabs-content" id="benben_tabsfd1_0-content">
            <view id="benben_tabsfd1_0-title" class="benben-tabs-title flex align-center justify-between flex ">
                        <view 
                :class="{ 'checkTitlefd1_0': tabs == '1', 'flex flex-wrap align-center myCoupon_titlefd1_0_c3': true }"
                @tap="tabs = '1'"
                :id="`benben_tabsfd1_0-title-item-${'1'}`"
                
              >
                
<text  >全部</text>

              </view>            <view 
                :class="{ 'checkTitlefd1_0': tabs == '2', 'flex flex-wrap align-center': true }"
                @tap="tabs = '2'"
                :id="`benben_tabsfd1_0-title-item-${'2'}`"
                
              >
                
<text  >未使用</text>

              </view>            <view 
                :class="{ 'checkTitlefd1_0': tabs == '3', 'flex flex-wrap align-center myCoupon_titlefd1_0_c5': true }"
                @tap="tabs = '3'"
                :id="`benben_tabsfd1_0-title-item-${'3'}`"
                
              >
                
<text  >已过期</text>

              </view>
            </view>
            <view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth }" id="benben_tabsfd1_0-line" class="benben-tabs-line flex benben-flex-tabs-line myCoupon_linefd1_0"></view>
          </view>
        </scroll-view>
            
        </benben-flex-tabs>
        
</view>
</view>
<!---flex布局flex布局结束-->
<!---flex布局flex布局开始-->
<template v-for = '(item,flex2) in dataList'>
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myCoupon_flex_2" :key='flex2'  >
            <view   class='flex flex-wrap align-center myCoupon_fd2_0'   v-if= "item.status=='1'"  >
            <view   class='flex flex-direction flex-wrap align-center justify-center myCoupon_fd2_0_c0'     >
            <view   class='flex flex-wrap align-center'     >
        <text class='myCoupon_fd2_0_c0_c0_c0' >￥</text>
<text class='myCoupon_fd2_0_c0_c0_c1' >{{item.money}}</text>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_0_c0_c1'     >
        <text class='myCoupon_fd2_0_c0_c1_c0' >满</text>
<text class='myCoupon_fd2_0_c0_c1_c1' >{{item.min_order_money}}</text>
<text class='myCoupon_fd2_0_c0_c1_c2' >可减</text>
</view>
</view>
    <view   class='flex flex-direction flex-wrap align-stretch flex-sub myCoupon_fd2_0_c1'     >
        <text class='myCoupon_fd2_0_c1_c0' >{{item.coupon_name}}</text>
<text class='myCoupon_fd2_0_c1_c1' >{{item.content}}</text>
    <view   class='flex flex-wrap align-center myCoupon_fd2_0_c1_c2'     >
        <text  >有效期至：</text>
<text class='flex-sub myCoupon_fd2_0_c1_c2_c1' >{{item.end_time}}</text>
</view>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_0_c2'     >
        <text class='myCoupon_fd2_0_c2_c0'     >未使用</text>
</view>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_1'   v-if= "item.status=='3'"  >
            <view   class='flex flex-direction flex-wrap align-center justify-center myCoupon_fd2_1_c0'     >
            <view   class='flex flex-wrap align-center'     >
        <text class='myCoupon_fd2_1_c0_c0_c0' >￥</text>
<text class='myCoupon_fd2_1_c0_c0_c1' >{{item.money}}</text>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_1_c0_c1'     >
        <text class='myCoupon_fd2_1_c0_c1_c0' >满</text>
<text class='myCoupon_fd2_1_c0_c1_c1' >{{item.min_order_money}}</text>
<text class='myCoupon_fd2_1_c0_c1_c2' >可减</text>
</view>
</view>
    <view   class='flex flex-direction flex-wrap align-stretch flex-sub myCoupon_fd2_1_c1'     >
        <text class='myCoupon_fd2_1_c1_c0' >{{item.coupon_name}}</text>
<text class='myCoupon_fd2_1_c1_c1' >{{item.content}}</text>
    <view   class='flex flex-wrap align-center myCoupon_fd2_1_c1_c2'     >
        <text  >有效期至：</text>
<text class='flex-sub myCoupon_fd2_1_c1_c2_c1' >{{item.end_time}}</text>
</view>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_1_c2'     >
        <text class='myCoupon_fd2_1_c2_c0' >已
使
用</text>
</view>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_2'   v-if= "item.status=='0'"  >
            <view   class='flex flex-direction flex-wrap align-center justify-center myCoupon_fd2_2_c0'     >
            <view   class='flex flex-wrap align-center'     >
        <text class='myCoupon_fd2_2_c0_c0_c0' >￥</text>
<text class='myCoupon_fd2_2_c0_c0_c1' >{{item.money}}</text>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_2_c0_c1'     >
        <text class='myCoupon_fd2_2_c0_c1_c0' >满</text>
<text class='myCoupon_fd2_2_c0_c1_c1' >{{item.min_order_money}}</text>
<text class='myCoupon_fd2_2_c0_c1_c2' >可减</text>
</view>
</view>
    <view   class='flex flex-direction flex-wrap align-stretch flex-sub myCoupon_fd2_2_c1'     >
        <text class='myCoupon_fd2_2_c1_c0' >{{item.coupon_name}}</text>
<text class='myCoupon_fd2_2_c1_c1' >{{item.content}}</text>
    <view   class='flex flex-wrap align-center myCoupon_fd2_2_c1_c2'     >
        <text  >有效期至：</text>
<text class='flex-sub myCoupon_fd2_2_c1_c2_c1' >{{item.end_time}}</text>
</view>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_2_c2'     >
        <text class='myCoupon_fd2_2_c2_c0' >已
过
期</text>
</view>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_3'   v-if= "item.status=='4'"  >
            <view   class='flex flex-direction flex-wrap align-center justify-center myCoupon_fd2_3_c0'     >
            <view   class='flex flex-wrap align-center'     >
        <text class='myCoupon_fd2_3_c0_c0_c0' >￥</text>
<text class='myCoupon_fd2_3_c0_c0_c1' >{{item.money}}</text>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_3_c0_c1'     >
        <text class='myCoupon_fd2_3_c0_c1_c0' >满</text>
<text class='myCoupon_fd2_3_c0_c1_c1' >{{item.min_order_money}}</text>
<text class='myCoupon_fd2_3_c0_c1_c2' >可减</text>
</view>
</view>
    <view   class='flex flex-direction flex-wrap align-stretch flex-sub myCoupon_fd2_3_c1'     >
        <text class='myCoupon_fd2_3_c1_c0' >{{item.coupon_name}}</text>
<text class='myCoupon_fd2_3_c1_c1' >{{item.content}}</text>
    <view   class='flex flex-wrap align-center myCoupon_fd2_3_c1_c2'     >
        <text  >有效期至：</text>
<text class='flex-sub myCoupon_fd2_3_c1_c2_c1' >{{item.end_time}}</text>
</view>
</view>
    <view   class='flex flex-wrap align-center myCoupon_fd2_3_c2'     >
        <text class='myCoupon_fd2_3_c2_c0' >已
失
效</text>
</view>
</view>
</view>
</template>
<!---flex布局flex布局结束-->
<!---flex布局flex布局开始-->
 <view class="flex benben-flex-layout flex-wrap align-center myCoupon_flex_3"   >
        <benben-empty :list-data="dataList">
<view class='flex-direction flex-wrap align-center justify-center flex myCoupon_fd3_0' >
<image class='myCoupon_fd3_0_c0' mode="widthFix"  :src='STATIC_URL+"139.png"'></image>
<text class='myCoupon_fd3_0_c1' >暂无数据</text>

</view>
</benben-empty>
</view>
<!---flex布局flex布局结束-->
    
    
    </view>
</template>
<script>
    import {validate} from '@/common/utils/validate.js'
    export default {
        components:{},
        
        
        data(){
			return {"tabsInfofd1_0":{ lineleft: '', lineWidth: '', moveX: 0, scrollX: 0, PageScrollX: 0 },"tabs":"1","dataList":[]};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            this.DataListFunc()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //获取优惠券列表
                async DataListFunc(){
                        //请求方法
    //数据验证
    
  let datadataList = await this.$api.get(global.apiUrls.post5cb5ad18a18fb, {
    type:this.tabs
  });
  if (datadataList.data.code != 1) {
    this.$message.info(datadataList.data.msg);
    return
  } 
  let infodataList = datadataList.data;
  this.dataList = infodataList.data
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:rgba(248, 248, 248, 1);background-size: 100% auto !important;
        }
    .myCoupon_flex_0{
        background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .myCoupon_fd0_0_c2{
        padding:0rpx 0rpx 0rpx 0rpx;width:200rpx;
    }
    .myCoupon_fd0_0_c1_c0{
        font-size:36rpx;font-weight:500;color:#333333;
    }
    .myCoupon_fd0_0_c0_c0{
        font-size:36rpx;color:#333;font-weight:500;
    }
    .myCoupon_fd0_0_c0{
        width:200rpx;
    }
    .myCoupon_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;line-height:88rpx;
    }
    .myCoupon_titlefd1_0_c5{
        margin:0rpx 75rpx 0rpx 0rpx;
    }
    .myCoupon_titlefd1_0_c3{
        margin:0rpx 0rpx 0rpx 88rpx;
    }
    .myCoupon_linefd1_0{
        background:var(--benbenbgColor0);width:40rpx;height:6rpx;top:82rpx;background-size:100% auto !important;border-radius:6rpx 6rpx 6rpx 6rpx;
    }
    .checkTitlefd1_0{
        font-weight:700 !important;font-size:32rpx !important;color:rgba(0, 178, 17, 1) !important;background-color:rgba(255, 255, 255, 1) !important;
    }
    ::v-deep .myCoupon_benbenTabsfd1_0{
        background:#fff;width:750rpx;height:100rpx;white-space:nowrap;text-align:center;font-size:32rpx;font-weight:400;color:rgba(51, 51, 51, 1);
    }
    .myCoupon_flex_2{
        padding:0rpx 32rpx 0rpx 32rpx;
    }
    .myCoupon_fd2_3_c2_c0{
        background:rgba(137, 137, 137, 1);font-size:24rpx;font-weight:400;color:#fff;border-radius:20rpx 20rpx 20rpx 20rpx;width:46rpx;text-align:center;padding:20rpx 0rpx 23rpx 0rpx;
    }
    .myCoupon_fd2_3_c2{
        border-radius:0rpx 16rpx 16rpx 0rpx;height:192rpx;padding:0rpx 17rpx 0rpx 14rpx;
    }
    .myCoupon_fd2_3_c1_c2_c1{
        -webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myCoupon_fd2_3_c1_c2{
        font-size:22rpx;font-weight:400;color:#fff;
    }
    .myCoupon_fd2_3_c1_c1{
        font-size:22rpx;font-weight:400;color:#fff;margin:12rpx 0rpx 14rpx 0rpx;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myCoupon_fd2_3_c1_c0{
        font-size:28rpx;font-weight:600;color:#fff;
    }
    .myCoupon_fd2_3_c1{
        padding:31rpx 32rpx 0rpx 54rpx;height:192rpx;
    }
    .myCoupon_fd2_3_c0_c1_c2{
        font-size:24rpx;font-weight:700;color:#fff;
    }
    .myCoupon_fd2_3_c0_c1_c1{
        font-size:24rpx;font-weight:700;color:#fff;
    }
    .myCoupon_fd2_3_c0_c1_c0{
        font-size:24rpx;font-weight:700;color:#fff;
    }
    .myCoupon_fd2_3_c0_c1{
        line-height:32rpx;
    }
    .myCoupon_fd2_3_c0_c0_c1{
        font-size:46rpx;font-weight:500;color:#fff;
    }
    .myCoupon_fd2_3_c0_c0_c0{
        font-size:24rpx;font-weight:500;color:#fff;
    }
    .myCoupon_fd2_3_c0{
        width:196rpx;border-radius:16rpx 0rpx 0rpx 16rpx;height:192rpx;
    }
    .myCoupon_fd2_3{
        background:url(/static/images/16.png) no-repeat ,#FFFFFF;margin:24rpx 0rpx 0rpx 0rpx;border-radius:16rpx 16rpx 16rpx 16rpx;box-shadow:-2rpx 4rpx 6rpx rgba(0, 0, 0, 0.06)rpx rgba(0,0,0,0.0600);
    }
    .myCoupon_fd2_2_c2_c0{
        background:rgba(137, 137, 137, 1);font-size:24rpx;font-weight:400;color:#fff;border-radius:20rpx 20rpx 20rpx 20rpx;width:46rpx;text-align:center;padding:20rpx 0rpx 23rpx 0rpx;
    }
    .myCoupon_fd2_2_c2{
        border-radius:0rpx 16rpx 16rpx 0rpx;height:192rpx;padding:0rpx 17rpx 0rpx 14rpx;
    }
    .myCoupon_fd2_2_c1_c2_c1{
        -webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myCoupon_fd2_2_c1_c2{
        font-size:22rpx;font-weight:400;color:#fff;
    }
    .myCoupon_fd2_2_c1_c1{
        font-size:22rpx;font-weight:400;color:#fff;margin:12rpx 0rpx 14rpx 0rpx;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myCoupon_fd2_2_c1_c0{
        font-size:28rpx;font-weight:600;color:#fff;
    }
    .myCoupon_fd2_2_c1{
        padding:31rpx 32rpx 0rpx 54rpx;height:192rpx;
    }
    .myCoupon_fd2_2_c0_c1_c2{
        font-size:24rpx;font-weight:700;color:#fff;
    }
    .myCoupon_fd2_2_c0_c1_c1{
        font-size:24rpx;font-weight:700;color:#fff;
    }
    .myCoupon_fd2_2_c0_c1_c0{
        font-size:24rpx;font-weight:700;color:#fff;
    }
    .myCoupon_fd2_2_c0_c1{
        line-height:32rpx;
    }
    .myCoupon_fd2_2_c0_c0_c1{
        font-size:46rpx;font-weight:500;color:#fff;
    }
    .myCoupon_fd2_2_c0_c0_c0{
        font-size:24rpx;font-weight:500;color:#fff;
    }
    .myCoupon_fd2_2_c0{
        width:196rpx;border-radius:16rpx 0rpx 0rpx 16rpx;height:192rpx;
    }
    .myCoupon_fd2_2{
        background:url(/static/images/16.png) no-repeat ,#FFFFFF;margin:24rpx 0rpx 0rpx 0rpx;border-radius:16rpx 16rpx 16rpx 16rpx;box-shadow:-2rpx 4rpx 6rpx rgba(0, 0, 0, 0.06)rpx rgba(0,0,0,0.0600);
    }
    .myCoupon_fd2_1_c2_c0{
        background:rgba(137, 137, 137, 1);font-size:24rpx;font-weight:400;color:#fff;border-radius:20rpx 20rpx 20rpx 20rpx;width:46rpx;text-align:center;padding:20rpx 0rpx 23rpx 0rpx;
    }
    .myCoupon_fd2_1_c2{
        border-radius:0rpx 16rpx 16rpx 0rpx;height:192rpx;padding:0rpx 17rpx 0rpx 14rpx;
    }
    .myCoupon_fd2_1_c1_c2_c1{
        -webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myCoupon_fd2_1_c1_c2{
        font-size:22rpx;font-weight:400;color:#fff;
    }
    .myCoupon_fd2_1_c1_c1{
        font-size:22rpx;font-weight:400;color:#fff;margin:12rpx 0rpx 14rpx 0rpx;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myCoupon_fd2_1_c1_c0{
        font-size:28rpx;font-weight:600;color:#fff;
    }
    .myCoupon_fd2_1_c1{
        padding:31rpx 32rpx 0rpx 54rpx;height:192rpx;
    }
    .myCoupon_fd2_1_c0_c1_c2{
        font-size:24rpx;font-weight:700;color:#fff;
    }
    .myCoupon_fd2_1_c0_c1_c1{
        font-size:24rpx;font-weight:700;color:#fff;
    }
    .myCoupon_fd2_1_c0_c1_c0{
        font-size:24rpx;font-weight:700;color:#fff;
    }
    .myCoupon_fd2_1_c0_c1{
        line-height:32rpx;
    }
    .myCoupon_fd2_1_c0_c0_c1{
        font-size:46rpx;font-weight:500;color:#fff;
    }
    .myCoupon_fd2_1_c0_c0_c0{
        font-size:24rpx;font-weight:500;color:#fff;
    }
    .myCoupon_fd2_1_c0{
        width:196rpx;border-radius:16rpx 0rpx 0rpx 16rpx;height:192rpx;
    }
    .myCoupon_fd2_1{
        background:url(/static/images/16.png) no-repeat ,#FFFFFF;margin:24rpx 0rpx 0rpx 0rpx;border-radius:16rpx 16rpx 16rpx 16rpx;box-shadow:-2rpx 4rpx 6rpx rgba(0, 0, 0, 0.06)rpx rgba(0,0,0,0.0600);
    }
    .myCoupon_fd2_0_c2_c0{
        background:rgba(255, 238, 223, 1);font-size:24rpx;font-weight:400;color:rgba(205, 62, 53, 1);border-radius:20rpx 20rpx 20rpx 20rpx;width:46rpx;text-align:center;padding:20rpx 0rpx 23rpx 0rpx;
    }
    .myCoupon_fd2_0_c2{
        border-radius:0rpx 16rpx 16rpx 0rpx;height:192rpx;padding:0rpx 17rpx 0rpx 14rpx;
    }
    .myCoupon_fd2_0_c1_c2_c1{
        -webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myCoupon_fd2_0_c1_c2{
        font-size:22rpx;font-weight:400;color:#fff;
    }
    .myCoupon_fd2_0_c1_c1{
        font-size:22rpx;font-weight:400;color:#fff;margin:12rpx 0rpx 14rpx 0rpx;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myCoupon_fd2_0_c1_c0{
        font-size:28rpx;font-weight:600;color:#fff;
    }
    .myCoupon_fd2_0_c1{
        padding:31rpx 32rpx 0rpx 54rpx;height:192rpx;
    }
    .myCoupon_fd2_0_c0_c1_c2{
        font-size:24rpx;font-weight:700;color:var(--benbenFontColor1);
    }
    .myCoupon_fd2_0_c0_c1_c1{
        font-size:24rpx;font-weight:700;color:var(--benbenFontColor1);
    }
    .myCoupon_fd2_0_c0_c1_c0{
        font-size:24rpx;font-weight:700;color:var(--benbenFontColor1);
    }
    .myCoupon_fd2_0_c0_c1{
        line-height:32rpx;
    }
    .myCoupon_fd2_0_c0_c0_c1{
        font-size:46rpx;font-weight:500;color:var(--benbenFontColor1);
    }
    .myCoupon_fd2_0_c0_c0_c0{
        font-size:24rpx;font-weight:500;color:var(--benbenFontColor1);
    }
    .myCoupon_fd2_0_c0{
        width:196rpx;border-radius:16rpx 0rpx 0rpx 16rpx;height:192rpx;
    }
    .myCoupon_fd2_0{
        background:url(/static/images/13.png) no-repeat ,#FFFFFF;margin:24rpx 0rpx 0rpx 0rpx;border-radius:16rpx 16rpx 16rpx 16rpx;box-shadow:-2rpx 4rpx 6rpx rgba(0, 0, 0, 0.06)rpx rgba(0,0,0,0.0600);
    }
    .myCoupon_flex_3{
        padding:50rpx 0rpx 0rpx 0rpx;
    }
    .myCoupon_fd3_0_c1{
        padding:30rpx 0rpx 0rpx 0rpx;color:#929292;
    }
    .myCoupon_fd3_0_c0{
        width:400rpx;border-radius:0rpx 0rpx 0rpx 0rpx;
    }
    .myCoupon_fd3_0{
        width:100%;padding:50rpx 0rpx 50rpx 0rpx;
    }
</style>